package com.design.demo.observer;

import java.util.Observable;

/**
 * @author guoliang.li
 * @date 2019/12/27 17:50
 * @description TODO 消息发布者
 */
public class Teacher extends Observable {

    private String info;

    public void setHome(String info){
        this.info = info;
        //改变通知状态为true
        setChanged();
        //通知所有订阅者
        notifyObservers();
    }

    public String getInfo() {
        return info;
    }
}
